From: Florian Müllner Date: Fri, 26 Jun 2020 01:22:29 +0000 (+0200) Subject: workspace: Use actual container allocation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~163 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=75f8903c7e714828a532fc6eff9032a2280bd716;p=gnome-shell.git workspace: Use actual container allocation We currently assume that the passed in Clutter.ActorBox matches the container allocation, but in reality it is the container's content area. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index f4189ec4d..0caf95d37 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -560,9 +560,10 @@ var WorkspaceLayout = GObject.registerClass({ } vfunc_allocate(container, box) { + const containerBox = container.allocation; const containerAllocationChanged = - this._lastBox === null || !this._lastBox.equal(box); - this._lastBox = box.copy(); + this._lastBox === null || !this._lastBox.equal(containerBox); + this._lastBox = containerBox.copy(); // If the containers size changed, we can no longer keep around // the old windowSlots, so we must unfreeze the layout @@ -582,7 +583,7 @@ var WorkspaceLayout = GObject.registerClass({ this._windowSlots = this._getWindowSlots(box.copy()); } - const allocationScale = box.get_width() / this._workarea.width; + const allocationScale = containerBox.get_width() / this._workarea.width; const workspaceBox = new Clutter.ActorBox(); const layoutBox = new Clutter.ActorBox();